home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCGUIA 127
/
PC Guia 127.iso
/
Software
/
Produtividade
/
OpenOffice.org 2.0.1
/
openofficeorg1.cab
/
bsh.jar
/
bsh
/
servlet
/
getVersion.bsh
< prev
next >
Wrap
Text File
|
2005-10-25
|
515b
|
21 lines
/*
Return a verbose version string.
Unfortunately, I was an idiot and didn't include a good version number
mechanism in the earliest releases of bsh. (It was in text in one of the
commands, but commands aren't packaged with all uses of bsh).
*/
import bsh.EvalError;
String getVersion()
{
try {
ver = this.interpreter.eval(
"import bsh.Interpreter; Interpreter.VERSION");
return "BeanShell version: "+ver;
} catch ( EvalError e ) {
return "BeanShell version 1.1 or older (Please upgrade)";
}
}